package webgoat.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import webgoat.pojo.User;
import webgoat.service.SqlService;

import java.util.List;

/**
 * @auth Administrator
 * @date 2019-11-16 10:39
 */

@RestController
@RequestMapping("sql")
public class SqlController {
    @Autowired
    SqlService sqlService;
    @PostMapping("user")
    public ResponseEntity<List<User>> queryUser(User user) {
        return ResponseEntity.ok(sqlService.queryUser(user));
    }
}
